.. :validated: 3.2.0

.. _swiu_edit_template:

Редактирование шаблона
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

На вкладке указывается текст скрипта шаблона конфигурации с возможностью его редактирования.

**Пример 1**

.. code-block:: bash

   {%- set StartPage = parameters.get('firefox_StartPage', none) -%}
   {%- set Homepage = parameters.get('firefox_Homepage', none) -%}
   {
      "policies":{
         "ImportEnterpriseRoots": true,
         "Certificates": {
            "Install": ["/etc/ipa/ca.crt"]
         },
   {% if Authentication %}
       {%- set Authentication = Authentication.replace(" ","") -%}
       {%- set TempAuthentication = Authentication.split(",") -%}
       {%- set TempAuthenticationLen = TempAuthentication |length -%}
         "Authentication":{
            "SPNEGO": [
             {% for i in range(TempAuthenticationLen) %}
             "{{ TempAuthentication[i] }}"{% if TempAuthenticationLen - 1 != i %},{% endif %}
             {% endfor %}
            ],
            "Delegated": [ 
             {% for i in range(TempAuthenticationLen) %}
             "{{ TempAuthentication[i] }}"{% if TempAuthenticationLen - 1 != i %},{% endif %}
             {% endfor %}
             ]
         }{% endif %}{% if Authentication and (Homepage or StartPage) %},{% endif %}
         {%- if Homepage or StartPage -%}
         "Homepage":{
             {%- if StartPage -%}"URL": "{{ StartPage }}",{% endif %}
            "Locked":true,
            "StartPage": {%- if Homepage == 'true' -%}"previous-session"{% else %}"homepage"{% endif %}
         }{% endif %}
      }
   }

**Пример 2**

.. code-block:: bash

   {%- set HomepageLocation = parameters.get('chromium_HomepageLocation', none) -%}
   {%- set RestoreOnStartupURLs = parameters.get('chromium_HomepageLocation', none) -%}
   {%- set RestoreOnStartup = parameters.get('chromium_RestoreOnStartup', none) -%}
   {
      {%- if HomepageLocation -%}{{'\n'}}"HomepageLocation": "{{ HomepageLocation }}",{{'\n'}}{%- endif -%}
      "RestoreOnStartup": {%- if RestoreOnStartup == 'true' -%}1{%- if HomepageLocation -%},{%- endif -%}{{'\n'}}{% else %}4{%- if HomepageLocation -%},{%- endif -%}{{'\n'}}{%- endif -%}
      {%- if HomepageLocation -%}
      "RestoreOnStartupURLs":[
         "{{ RestoreOnStartupURLs }}"
      ]
      {%- endif -%}
   }

.. include:: /9_userguide/save_close.inc
